class fib
{  
    public static void main(String args[])
{
      int f1 = 0, f2 = 1, f3;
      System.out.println("Program for Fibonacci Series");
      int n=10;
      System.out.printf("\n\nPrinting Fibonacci Series from 0 - %d\n\n", n);
      System.out.printf("%d\t%d\t", f1, f2);
      while (true)
      {
            f3 = f1 + f2;
            if (f3 > n)
               break;
            System.out.printf("%d\t", f3);
            f1 = f2;
            f2 = f3;
      }
      System.out.println();
   }
}

class fib2
{
 public static void main(String args[])
{
int n=0;
  int f1 = 0, f2 = 1, f;
System.out.println(f1);
System.out.println(f2);

for(n = 2; n<15; n++) 

{ 
f = f1 +f2;
System.out.println(f);
f1 = f2 ; 
f2 = f ;
}
}
}


class primer
{
       public static void main(String[] felight)
       {                        
           int p=0;    
               int i,j;
           for(j=1;j<100;j++)
          {
                  p=1;
               for(i=2;i<j;i++)
               {
               
                   if(j%i==0)
                      
                   {
                      p=0;
                       break;
                    
                     }
                }
                   if(p==1)
                    {
                    System.out.println(j);
            
                   }

       }
}
}

class prime
{
       public static void main(String[] felight)
       {                        
               
               int n=4;int i;int res=0;
               for(i=2;i<=n/2;i++)
               {
               res=n%i;
               if(res==0)
                    System.out.println(n + " is not Prime Number");
               else
     
                    System.out.println(n + " is  Prime Number");
               }
       }
}



class wfelight
{
   public static void main(String[] felight)
{

  int n2=0;
 while(n2==0 || n2<=100)
            {
   
            System.out.println(" HEELLLOOOO felight !! ");
            n2++;

}
}
}


class dofelight
{
   public static void main(String[] felight)
{

  int n2=0;
   do{
   
   
            System.out.println(" HEELLLOOOO felight !! ");
            n2++;

     }
  while(n2<=100);
            
}

}

class even
{

 public static void main(String[] felight)
       {  
      int num  = 7;    
 
     if(num % 2 == 0)
    
        {
            System.out.println("Number is even");

         }   

        else

        System.out.println("Number is odd");   
  }
}

class countall
{
       public static void main(String[] felight)
       {

       
                 
         int k,counte=0;
   
        for(k=1;k<=1000;k++)
       { 
            if(k % 2 == 0)
             counte++;
       
       }
   System.out.println("No. of Even="+counte);
   System.out.println("No. of Odd="+(1000-counte));
    


               int p=0;    
               int i,j;
               int cp=0;


           for(j=1;j<=1000;j++)
          {
                  p=1;
               for(i=2;i<j;i++)
               {
               
                   if(j%i==0)
                      
                   {
                      p=0;
                       break;
                    
                   }
                }
                   if(p==1)
                    {
                       cp++;
            
                   }

       }
  System.out.println("No. of Prime="+ cp);

}
}

class summation
{

  public static void main(String[] args)
{
    
   int sum=0;
  int i;
  for(i=1;i<=100;i++)
    {
      sum=sum+i;
    }
  System.out.println("Summation = "+ sum);
}
}

